namespace AddingRoleExample
{
workflow MyFlow
{
Flow flow;
Role role;
User user;
// Create a workflow with restricted access.
// Also create a 'user' that can access the new workflow.
public Create()
{
flow = new Flow();
role = new Role(""Manager"");
workflow.AddAccessRole(flow, role);
// add the role to the user named "ManagerUser".
user = new User(""ManagerUser"");
user.AddRole(role);
}
}
workflow Flow
{
// add code for the workflow here.
}
}